<?php
class StoreCategory extends StoreAppModel {
	var $name = 'StoreCategory';
	var $displayField = 'name';
	var $recursive = 0;
	var $actsAs = array('Tree');
	
	var $hasAndBelongsToMany = array(
	'StoreProduct' =>
		array( 	'className' => 'StoreProduct',
				'joinTable' => 'store_product_categories',
				'foreignKey' => 'category_id',
				'associationForeignKey' => 'product_id',
				'order' => 'StoreCategory.name',
				'unique' => true
			 )
	);

}
?>